package cn.edu.just.firstjavaapp.l17;

public class Counter {
    int c=0;

    public synchronized void increment(){
        c++;
    }

    public synchronized void decrement(){
        c--;
    }

    public synchronized int getCounter(){
        return c;
    }
}
